package com.sunlands.deskmate.client;

import com.sunlands.deskmate.client.vo.DialogVO;
import com.sunlands.deskmate.config.OauthFeignConfig;
import com.sunlands.deskmate.vo.RoomSimpleInfo;
import com.sunlands.deskmate.vo.UserLiveStateVO;
import com.sunlands.deskmate.vo.response.BusinessResult;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;

/**
 * @author shixiaopeng
 */
@SuppressWarnings("unused")
@FeignClient(value = "tz-live-video", configuration = OauthFeignConfig.class)
public interface LiveVideoService {

    /**
     * 查询用户id列表
     *
     * @param queryType
     * @param roomId
     * @return
     */
    @GetMapping("/liveRoom/getUserIdsByRoomId")
    BusinessResult<List<Long>> getUserIdsByRoomId(@RequestParam(value = "queryType", defaultValue = "0") Integer queryType, @RequestParam(value = "roomId") Long roomId);

    /**
     * 查询房间信息
     *
     * @param roomId
     * @return
     */
    @GetMapping("/liveRoom/roomInfoSimple/{roomId}")
    BusinessResult<RoomSimpleInfo> getRoomSimpleInfo(@PathVariable("roomId") Long roomId);


    /**
     * 查询用户在房间中的状态
     * @param userIds 用户id集合
     * @return
     */
    @PostMapping("publisher/live-state")
    BusinessResult<List<UserLiveStateVO>> findLiveState(@RequestBody List<Long> userIds);


    @GetMapping(value = "/timeLearnRoom/room/users")
    BusinessResult<List<DialogVO>> allRoomUsers(@ApiParam(value = "房间id", required = true) @RequestParam(value = "roomId") Long roomId);


}

